<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>陌陌酒店平台</title>
<!-- Stylesheets -->
<link href="static/css/bootstrap.css" rel="stylesheet">
<link href="static/css/revolution-slider.css" rel="stylesheet">
<link href="static/css/style.css" rel="stylesheet">

<!--Favicon-->
<link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
<link rel="icon" href="static/images/favicon.ico" type="image/x-icon">
<!--百度-->
	<style type="text/css">
		#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}


	</style>
<!-- Responsive -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="static/css/responsive.css" rel="stylesheet">
<script type="text/javascript" src="static/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=zDqmG3CQkiKUB2Bjl6Truw8MhV0klRck"></script>
	<script type="text/javascript">
		//Search Box Toggle
		// $.function(
		// 	//if($('.seach-toggle').length){
		// 		//alert("111")
		// 		//Dropdown Button
		// 		$('.seach-toggle').on('click', function() {
		// 			alert("222")
		// 			$(this).toggleClass('active');
		// 			$(this).next('.search-box').toggleClass('now-visible');
		// 		})
		// 	//}
		// )


		$(function () {
			// if($('.seach-toggle').length) {
			// 	alert("111")
			// 	//Dropdown Button
				$('.seach-toggle').on('click', function () {
					alert("222")
					$(this).toggleClass('active');
					$(this).next('.search-box').toggleClass('now-visible');
				})
				$(".seach-toggle").click(function () {
					alert("222");
					$(this).toggleClass('active');
					$(this).next('.search-box').toggleClass('now-visible');
				})
			//}
		})


		function change(obj) {
			//console.log(obj.value)
			var addr = document.getElementsByName("addr")[0];
			//console.log(addr)
			if (obj.value === "广东"){
				addr.innerHTML = "<option value='广州' >广州</option><option value='深圳'>深圳</option>"
			} else if (obj.value === "广西"){
				addr.innerHTML = "<option value='玉林'>玉林</option><option value='桂林'>桂林</option>"
			}else {
				addr.innerHTML = "<option>'---请输入---'</option>"
			}
		}


	</script>

	<script type="text/javascript">
		function submitBtn() {
			var datepicker = $("#datepicker").val();    // 获取id为datepicker的<input>框数据
			var datepickerone = $("#datepickerone").val();    // 获取id为datepickerone的<input>框数据
			var customer = $("#customer").val();    // 获取id为customer的下拉框数据
			var cusNum = $("#cusNum").val();    // 获取id为cusNum的下拉框数据
			// 判断
			if (datepicker.length == 0) {
				alert("请选择到达日期");
				return;
			}
			if (datepickerone.length == 0) {
				alert("请选择离开日期");
				return;
			}
			if (datepickerone < datepicker) {
				alert("离开日期必须比入住日期晚");
				return;
			}
			var data={"datepicker": datepicker, "datepickerone": datepickerone, "customer": customer, "cusNum": cusNum}
			// Ajax提交数据
			$.ajax({
				url: "/searchByCondition",    // 提交到controller的url路径
				type: "post",    // 提交方式
				data: JSON.stringify(data),
				contentType:"application/json;charset=utf-8",
				dataType: "json",    // 服务器端返回的数据类型
				success: function (data) {    // 请求成功后的回调函数，其中的参数data为controller返回的map,也就是说,@ResponseBody将返回的map转化为JSON格式的数据，然后通过data这个参数取JSON数据中的值
					if (data.msg == "success") {
						//跳转到系统首页

					} else {

					}
				},
			});
		}

	</script>

</head>



<body>
<div class="page-wrapper">

	<div class="header" id="header" ></div>
	<script type="text/javascript">
		//登录成功回显用户信息
		$(function(){
			$("#header").load('header.html',function () {
				$.ajax({
					type:"post",
					url:"getUserBySession",
					contentType: "application/json; charset=utf-8",
					async:true,
					success:function(data){
						console.log(data.username)
						if (data.username ===undefined) {
							//$(".userIcon").text(data.username)
						}else {
							//console.log("ttttttt"+data.username);

							$(".userIcon").text(data.username);
							$(".userReg").css("display","none");
							$(".userLog").text("切换用户");
						}
					},
					error: function (xhr) {
						alert("异常");
					}
				});
			})


		});


		/*引入Header部分公共代码*/
		// $(function(){
		// 	$.ajax({
		// 		type:"get",
		// 		url:"header.html",
		// 		async:true,
		// 		success:function(data){
		// 			$("#header").html(data);
		// 		}
		// 	});
		// });
	</script>



    <!-- main header area end -->

     <!--Main Slider-->
    <section class="main-banner banner">
	    <div class="rev_slider_wrapper">
	        <div id="main_slider" class="rev_slider"  data-version="5.0">
	        	
	            <ul>
	                <li data-index='rs-355' class="slide_show slide_1" data-transition='slidingoverlayright' data-slotamount='default' data-easein='default' data-easeout='default' data-masterspeed='default' data-rotate='0' data-saveperformance='off' data-title='Slide Boxes' data-description=''> <!-- Slide_show -->
	                    <img src="static/images/slider/slider-1.jpg" alt="" data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" class="rev-slidebg">
	                    <div class="main_heading tp-caption tp-resizeme"
	                        data-x="center" data-hoffset="0"
	                        data-y="center" data-voffset="-50"
	                        data-whitespace="nowrap"
	                        data-transform_idle="o:1;"
	                        data-transform_in="x:[175%];y:0px;z:0;rX:0;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0.01;s:3000;e:Power3.easeOut;" 
	                        data-transform_out="y:[100%];s:1000;s:1000;" 
	                        data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
	                        data-start="2000" 
	                        data-splitin="none" 
	                        data-splitout="none">
	                        <div class="banner-title">你特别的节日</div>
	                    </div>
	                    <div class="tp-caption tp-resizeme" 
	                        data-x="center" data-hoffset="0" 
	                        data-y="center" data-voffset="50" 
	                        data-transform_idle="o:1;"                         
	                        data-transform_in="x:[-175%];y:0px;z:0;rX:0;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0.01;s:3000;e:Power3.easeOut;" 
	                        data-transform_out="s:1000;e:Power3.easeInOut;s:1000;e:Power3.easeInOut;"     
	                        data-splitin="none" 
	                        data-splitout="none" 
	                        data-responsive_offset="on"
	                        data-start="2300">
	                        <div class="banner-text">我坐在那里，把自己奉献给了我最心爱的人</div>
	                    </div>
	                    <div class="tp-caption tp-resizeme" 
	                        data-x="center" data-hoffset="0" 
	                        data-y="center" data-voffset="140" 
	                        data-transform_idle="o:1;"                         
	                        data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:2000;e:Power4.easeInOut;" 
	                        data-transform_out="s:1000;e:Power3.easeInOut;s:1000;e:Power3.easeInOut;"      
	                        data-splitin="none" 
	                        data-splitout="none" 
	                        data-responsive_offset="on"
	                        data-start="2600">
	                        <div class="banner-btn">
	                            <a href="#">现在联系</a>
	                        </div>
	                    </div>
	                </li> <!-- /Slide_show -->

	                <li data-index='rs-356' class="slide_show slide_2" data-transition='slidingoverlayleft' data-slotamount='default' data-easein='default' data-easeout='default' data-masterspeed='default' data-rotate='0' data-saveperformance='off' data-title='Slide Slots vertical' data-description=''> <!-- Slide2 -->

	                    <img src="static/images/slider/slider-2.jpg" alt="" data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" class="rev-slidebg">

	                    <div class="main_heading tp-caption tp-resizeme"
	                        data-x="center" data-hoffset="0"
	                        data-y="center" data-voffset="-50"
	                        data-whitespace="nowrap"
	                        data-transform_idle="o:1;"
	                        data-transform_in="x:[175%];y:0px;z:0;rX:0;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0.01;s:3000;e:Power3.easeOut;" 
	                        data-transform_out="y:[100%];s:1000;s:1000;" 
	                        data-mask_out="x:inherit;y:inherit;s:inherit;e:inherit;" 
	                        data-start="2000" 
	                        data-splitin="none" 
	                        data-splitout="none">
	                        <div class="banner-title">你特别的节日</div>
	                    </div>
	                    <div class="tp-caption tp-resizeme" 
	                        data-x="center" data-hoffset="0" 
	                        data-y="center" data-voffset="50" 
	                        data-transform_idle="o:1;"                         
	                        data-transform_in="x:[-175%];y:0px;z:0;rX:0;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0.01;s:3000;e:Power3.easeOut;" 
	                        data-transform_out="s:1000;e:Power3.easeInOut;s:1000;e:Power3.easeInOut;"     
	                        data-splitin="none" 
	                        data-splitout="none" 
	                        data-responsive_offset="on"
	                        data-start="2300">
	                        <div class="banner-text">我坐在那里，把自己奉献给了我最心爱的人</div>
	                    </div>
	                    <div class="tp-caption tp-resizeme" 
	                        data-x="center" data-hoffset="0" 
	                        data-y="center" data-voffset="140" 
	                        data-transform_idle="o:1;"                         
	                        data-transform_in="y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;opacity:0;s:2000;e:Power4.easeInOut;" 
	                        data-transform_out="s:1000;e:Power3.easeInOut;s:1000;e:Power3.easeInOut;"                     
	                        data-splitin="none" 
	                        data-splitout="none" 
	                        data-responsive_offset="on"
	                        data-start="2600">
	                        <div class="banner-btn">
	                            <a href="#">现在联系</a>
	                        </div>
	                    </div>

	                </li> <!-- /Slide2 -->
	            </ul>
	        </div> <!-- /main_slider -->
	    </div><!-- /rev_slider_wrapper -->
    </section>
    <!--Main Slider End-->

    <!-- search service -->
    <section class="search-service">
    	<div class="container">
			<div class="search-service-bg" style="width: 1300px ;margin-left: -45px">
				<div class="service-content" style="width: 1300px">
                    <input type="text" name="date" placeholder="到达日期" id="datepicker" >
                    <i class="fa fa-calendar" aria-hidden="true"></i>
                    <input type="text" name="date" placeholder="离开日期" id="datepickerone">
                    <i class="fa fa-calendar" aria-hidden="true"></i>
                    <select class="custom-select-box" id="customer">
                        <option>顾客</option>
                        <option>先生</option>
                        <option>女士</option>
                    </select>
                    <select class="custom-select-box" id="cusNum">
                        <option>人数</option>
                        <option>1 人</option>
                        <option>2 人</option>
                        <option>3 人</option>
						<option>4 人</option>
                        <option>4人以上</option>
                    </select>
					<select  id="location" onchange="change(this)">
						<option value="select">---请选择地址---</option>
						<option value="广东" >广东</option>
						<option value="广西">广西</option>
					</select>
					<select name="addr">
					</select>
                    <a href="#" id="search" >查看空房情况</a>
                </div>
			</div>
    	</div>
    </section>
    <!-- search service end -->

	<!--搜索ajax-->
	<script type="text/javascript">
		$(function  () {
			$("#search").click(function () {
				var peoples = $("#cusNum").val();

				var string = peoples.split('人')[0];
				$.ajax({
					//提交数据的类型 POST GET
					type:"POST",
					//提交的网址
					url:"getRooms",
					dataType:"json",
					async:true,
					//成功返回之后调用的函数
					contentType:"application/json",
					data: JSON.stringify({
						"arrivalDate": $("#datepicker").val(),
						"departureDate":$("#datepickerone").val(),
						"customer":$("#customer").val(),
						"peopleNums":string,
						"location":"%"+$("#location").val()+"%"

					}),
					success:function(returnData){
						location.href="user-rooms-grid.html"
					},
					//调用出错执行的函数
					error: function(responseText){
						//请求出错处理
						console.error(responseText);
					}
				});
			})


		})
	</script>



    <!-- service section -->
    <section class="service-section">
    	<div class="container">
    		<div class="service-title text-center">
    			<div class="section-title">房间和衣服</div>
    			<div class="title">除了在过失中没有明确的责任外</div>
    		</div>
			<div id="location1"></div>

    		<div class="row" id="row">

    		</div>
    	</div>
</section>
    <!-- service section end -->

    <!-- about section -->
    <section class="about-section">
    	<div class="container">
    		<div class="row">
				<div class="about-content">
					<div class="section-title"> <span>陌陌酒店</span></div>
					<p>酒店管理专家为您精心定制各项服务，一流的管理、一流的团队、一流的服务、一流的配套一定将是您精彩人生的最佳驿站。</p>
					<ul class="list">
						<li>陌陌酒店是集餐饮、旅业、会议、休闲娱乐为一体的综合型商务酒店平台。</li>
						<li>陌陌酒店拥有中餐厅、西餐厅、韩国餐厅、火锅餐厅四个不同的餐饮场所。</li>
						<li>陌陌酒店距国家5A景区仅需1小时、是您旅游观光、居家休闲的梦幻天堂 。</li>
					</ul>
				</div>
    		</div>
    	</div>
    </section>
    <!-- about section end -->

    <!-- our-speciality section -->
    <section class="our-speciality">
    	<div class="container">
    		<div class="speciality-title text-center">
				<div class="section-title">我们的特色</div>
				<div class="title">不同文化和气质底蕴</div>
    		</div>
    		<div class="row">
    			<div class="col-md-3 col-sm-6 col-xs-12">
    				<div class="single-item">
    					<div class="inner-box">
                            <a href="#">
                            	<div class="img-box"><figure><img src="static/images/home/special-1.jpg" alt=""></figure></div>
	                            <div class="overlay-box">
	                                <div class="overlay-inner">
	                                </div>
	                            </div>
                            </a>
                        </div>
    					<div class="img-title">美味的食物</div>
    				</div>
    			</div>
    			<div class="col-md-3 col-sm-6 col-xs-12">
    				<div class="single-item">
    					<div class="inner-box">
                            <a href="#">
                            	<div class="img-box"><figure><img src="static/images/home/special-2.jpg" alt=""></figure></div>
	                            <div class="overlay-box">
	                                <div class="overlay-inner">
	                                </div>
	                            </div>
                            </a>
                        </div>
    					<div class="img-title">健身房</div>
    				</div>
    			</div>
    			<div class="col-md-3 col-sm-6 col-xs-12">
    				<div class="single-item">
    					<div class="inner-box">
                            <a href="#">
                            	<div class="img-box"><figure><img src="static/images/home/special-3.jpg" alt=""></figure></div>
	                            <div class="overlay-box">
	                                <div class="overlay-inner">
	                                </div>
	                            </div>
                            </a>
                        </div>
    					<div class="img-title">餐厅</div>
    				</div>
    			</div>
    			<div class="col-md-3 col-sm-6 col-xs-12">
    				<div class="single-item">
    					<div class="inner-box">
                            <a href="#">
                            	<div class="img-box"><figure><img src="static/images/home/special-4.jpg" alt=""></figure></div>
	                            <div class="overlay-box">
	                                <div class="overlay-inner">
	                                </div>
	                            </div>
                            </a>
                        </div>
    					<div class="img-title">美容</div>
    				</div>
    			</div>
    		</div>
    	</div>
    </section>
    <!-- our-speciality section end -->

    <!-- img-gallery section -->
    <section class="img-gallery text-center">
    	<div class="container-fullwidth">
    		<div class="gallery-title">
				<div class="section-title">我们的风格</div>
				<div class="title">带你感受不一样的风情</div>
    		</div>
    		<ul class="image-slider">
				<li>
					<div class="single-item">
						<div class="img-holder">
	                        <figure><img src="static/images/gallery/1.jpg" alt=""></figure>
	                        <div class="overlay">
	                            <div class="box">
	                                <div class="content">
	                                    <a href="static/images/gallery/1.jpg" class="fancybox"><i class="fa fa-plus" aria-hidden="true"></i></a>
	                                    <div class="text">这儿有照片</div>
	                                </div>
	                            </div>
	                        </div>
	                    </div>
					</div>
				</li>
            	<li>
					<div class="single-item">
						<div class="img-holder">
	                        <figure><img src="static/images/gallery/2.jpg" alt=""></figure>
	                        <div class="overlay">
	                            <div class="box">
	                                <div class="content">
	                                    <a href="static/images/gallery/2.jpg" class="fancybox"><i class="fa fa-plus" aria-hidden="true"></i></a>
	                                    <div class="text">这儿有照片</div>
	                                </div>
	                            </div>
	                        </div>
	                    </div>
					</div>
				</li>
            	<li>
					<div class="single-item">
						<div class="img-holder">
	                        <figure><img src="static/images/gallery/3.jpg" alt=""></figure>
	                        <div class="overlay">
	                            <div class="box">
	                                <div class="content">
	                                    <a href="static/images/gallery/3.jpg" class="fancybox"><i class="fa fa-plus" aria-hidden="true"></i></a>
	                                    <div class="text">这儿有照片</div>
	                                </div>
	                            </div>
	                        </div>
	                    </div>
					</div>
				</li>
            	<li>
					<div class="single-item">
						<div class="img-holder">
	                        <figure><img src="static/images/gallery/4.jpg" alt=""></figure>
	                        <div class="overlay">
	                            <div class="box">
	                                <div class="content">
	                                    <a href="static/images/gallery/4.jpg" class="fancybox"><i class="fa fa-plus" aria-hidden="true"></i></a>
	                                    <div class="text">这儿有照片</div>
	                                </div>
	                            </div>
	                        </div>
	                    </div>
					</div>
				</li>
            	<li>
					<div class="single-item">
						<div class="img-holder">
	                        <figure><img src="static/images/gallery/5.jpg" alt=""></figure>
	                        <div class="overlay">
	                            <div class="box">
	                                <div class="content">
	                                    <a href="static/images/gallery/5.jpg" class="fancybox"><i class="fa fa-plus" aria-hidden="true"></i></a>
	                                    <div class="text">这儿有照片</div>
	                                </div>
	                            </div>
	                        </div>
	                    </div>
					</div>
				</li>
			</ul>
    	</div>
    </section>
    <!-- img-gallery section end -->

    <!-- testimonials section -->
	<section class="testimonials-section">
		<div class="container">
			<div class="testimonials-title text-center">
				<div class="section-title">我们的见证</div>
				<div class="text">时间见证我们的成长</div>
			</div>
			<div class="three-column-carousel">
				<div class="single-item">
					<div class="text">
						爱回家，爱老婆，爱洗衣做饭，也爱做牛做马。我不是春哥也不是曾哥，我是茱莉亚·罗伯逊。我和你不一样，我要结婚了!<br>时间：3月22日，地点：陌陌酒店。
					</div>
					<div class="testimonial-autor">
						<div class="img-box">
							<figure><img src="static/images/testimonial/1.png" alt=""></figure>
						</div>
						<div class="autor-content">
							<h4>茱莉亚·罗伯逊</h4>
							<span>快乐的客户</span>
						</div>
					</div>
				</div>
				<div class="single-item">
					<div class="text">
						这一年，我们见证了陌陌酒店的成长，蜕变，而陌陌酒店也在不断完善自己，希望为客户提供更好的服务!<br>时间：2月05日，地点：陌陌酒店。
					</div>
					<div class="testimonial-autor">
						<div class="img-box">
							<figure><img src="static/images/testimonial/2.png" alt=""></figure>
						</div>
						<div class="autor-content">
							<h4>斯威夫特·罗伯逊</h4>
							<span>快乐的客户</span>
						</div>
					</div>
				</div>
				<div class="single-item">
					<div class="text">
						创业是条漫长的道路，愿在这条路上尽情挥洒汗水、不断付出的你，能够不忘初心，最终实现梦想的初衷!<br>时间：4月05日，地点：陌陌酒店。
					</div>
					<div class="testimonial-autor">
						<div class="img-box">
							<figure><img src="static/images/testimonial/3.png" alt=""></figure>
						</div>
						<div class="autor-content">
							<h4>茱莉亚·罗伯逊</h4>
							<span>快乐的客户</span>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
    <!-- testimonials section end -->

    <!-- fact counter section -->
    <section class="fact-counter">
    	<div class="container">
    		<div class="row">
    			<div class="col-md-3 col-sm-6 col-xs-12">
    				<div class="single-item one">
    					<article class="column wow fadeIn" data-wow-duration="0ms">
                            <div class="count-outer"><span class="count-text" data-speed="1500" data-stop="250">0</span></div>
                            <div class="text">五星级评分</div>
                        </article>
    				</div>
    			</div>
    			<div class="col-md-3 col-sm-6 col-xs-12">
    				<div class="single-item two">
    					<article class="column wow fadeIn" data-wow-duration="0ms">
                            <div class="count-outer"><span class="count-text" data-speed="1500" data-stop="1250">0</span></div>
                            <div class="text">国际宾客</div>
                        </article>
    				</div>
    			</div>
    			<div class="col-md-3 col-sm-6 col-xs-12">
    				<div class="single-item three">
    					<article class="column wow fadeIn" data-wow-duration="0ms">
                            <div class="count-outer"><span class="count-text" data-speed="1500" data-stop="150">0</span></div>
                            <div class="text">新友谊</div>
                        </article>
    				</div>
    			</div>
    			<div class="col-md-3 col-sm-6 col-xs-12">
    				<div class="single-item four">
    					<article class="column wow fadeIn" data-wow-duration="0ms">
                            <div class="count-outer"><span class="count-text" data-speed="1500" data-stop="550">0</span></div>
                            <div class="text">早餐</div>
                        </article>
    				</div>
    			</div>
    		</div>
    	</div>
    </section>
    <!-- fact counter section end -->

    <!-- news section -->
    <section class="news-section">
    	<div class="container">
    		<div class="news-title text-center">
    			<div class="section-title">新闻与事件</div>
    			<div class="title">除非是偶然的丘比特，否则他不会犯错误。</div>
    		</div>
    		<div class="row" id="news">
<!--    			<div class="col-md-6 col-sm-6 col-xs-12">-->
<!--    				<div class="single-item">-->
<!--    					<div class="img-box">-->
<!--    						<a href="news-detail.html"><figure><img src="static/images/news/news-1.jpg" alt=""></figure></a>-->
<!--    					</div>-->
<!--    					<div class="news-content">-->
<!--    						<div class="date">20<span>五月</span></div>-->
<!--    						<a href="news-detail.html"><h3>这是一种极端的爱</h3></a>-->
<!--    						<ul class="list">-->
<!--    							<li><i class="fa fa-user" aria-hidden="true"></i>Admin</li>-->
<!--    							<li><i class="fa fa-heart-o" aria-hidden="true"></i>350</li>-->
<!--    							<li><i class="fa fa-comments-o" aria-hidden="true"></i>30</li>-->
<!--    						</ul>-->
<!--    					</div>-->
<!--    					<p>在实验室刚开始的时候，洛姆·伊姆森·多洛尔把自己奉献给了一位非常聪明的人-->
<!--							多洛尔矿是一种不含矿质元素的小型矿体。-->
<!--							我不知道你的名字。</p>-->
<!--    				</div>-->
<!--    			</div>-->
    			<div class="col-md-6 col-sm-6 col-xs-12" >
    				<div class="sidbar-news" id="newschild">
<!--    					<div class="single-item">-->
<!--							<div class="img-holder">-->
<!--		                        <a href="news-detail.html"><figure><img src="static/images/news/1.jpg" alt=""></figure>-->
<!--		                        	<div class="overlay">-->
<!--			                            <div class="box">-->
<!--			                                <div class="content">-->
<!--			                                    <div class="date">20<span>五月</span></div>-->
<!--			                                </div>-->
<!--			                            </div>-->
<!--			                        </div>-->
<!--		                        </a>-->
<!--		                    </div>-->
<!--		                     <a href="news-detail.html"><h3>埃提姆</h3></a>-->
<!--		                     <p>我坐在那里，把自己奉献给了我所爱的人。-->
<!--								 暴风雨刚开始的时候，人们都很紧张。</p>-->
<!--						</div>-->
<!--						<div class="single-item">-->
<!--							<div class="img-holder">-->
<!--		                        <a href="news-detail.html"><figure><img src="static/images/news/2.jpg" alt=""></figure>-->
<!--		                        	<div class="overlay">-->
<!--			                            <div class="box">-->
<!--			                                <div class="content">-->
<!--			                                    <div class="date">20<span>五月</span></div>-->
<!--			                                </div>-->
<!--			                            </div>-->
<!--			                        </div>-->
<!--		                        </a>-->
<!--		                    </div>-->
<!--		                    <a href="news-detail.html"><h3>埃提姆</h3></a>-->
<!--		                    <p>我的悲伤坐在我的脚下。-->
<!--								当我们到达我们的家时，我们的工作和痛苦是巨大的。</p>-->
<!--						</div>-->
<!--						<div class="single-item">-->
<!--							<div class="img-holder">-->
<!--		                        <a href="news-detail.html"><figure><img src="static/images/news/3.jpg" alt=""></figure>-->
<!--		                        	<div class="overlay">-->
<!--			                            <div class="box">-->
<!--			                                <div class="content">-->
<!--			                                    <div class="date">20<span>五月</span></div>-->
<!--			                                </div>-->
<!--			                            </div>-->
<!--			                        </div>-->
<!--		                        </a>-->
<!--		                    </div>-->
<!--		                    <a href="news-detail.html"><h3>埃提姆</h3></a>-->
<!--		                    <p>我的悲伤坐在我的脚下。-->
<!--								当我们到达我们的家时，我们的工作和痛苦是巨大的。</p>-->
<!--						</div>-->
<!--    				</div>-->
    			</div>
    		</div>
    	</div>
		</div>
    </section>
    <!-- news section end -->

	<!--新闻显示-->
	<script type="text/javascript">
		$(function  () {

			$.ajax({
				//提交数据的类型 POST GET
				type:"POST",
				//提交的网址
				url:"selectNewsLimit",
				dataType:"json",
				async:true,
				//成功返回之后调用的函数
				contentType:"application/json",

				success:function(returnData){
					var array = returnData;
					var array =array.slice(0,1)
                    //alert("新闻1"+array.length)
                    $.each(array,function (i, value){
                        //获取数据库日期
                        var now = new Date(value.time);
                        //获取日期年份
                        var year = now.getFullYear();
                        //获取日期月份
                        var month =(now.getMonth() + 1).toString();
                        //获取日期天数
                        var day = (now.getDate()).toString()
                        // <!--展示酒店-->

                        $("#news").append(
                            "\t\t<div class=\"col-md-6 col-sm-6 col-xs-12\">\n" +
                            "    \t\t\t\t<div class=\"single-item\">\n" +
                            "    \t\t\t\t\t<div class=\"img-box\">\n" +
                            "    \t\t\t\t\t\t<a href=\"news-detail.html\"><figure><img src=\"static/images/news/"+value.pic+"\" alt=\"\" style='height: 50px;width: 50px'></figure></a>\n" +
                            "    \t\t\t\t\t</div>\n" +
                            "    \t\t\t\t\t<div class=\"news-content\">\n" +
                            "    \t\t\t\t\t\t<div class=\"date\">"+day+"<span>"+month+"月</span></div>\n" +
                            "    \t\t\t\t\t\t<a href=\"news-detail.html\"><h3>"+value.titel+"</h3></a>\n" +
                            "    \t\t\t\t\t\t<ul class=\"list\">\n" +
                            "    \t\t\t\t\t\t\t<li><i class=\"fa fa-user\" aria-hidden=\"true\"></i>"+value.username+"</li>\n" +
                            "    \t\t\t\t\t\t\t<li><i class=\"fa fa-heart-o\" aria-hidden=\"true\"></i>350</li>\n" +
                            "    \t\t\t\t\t\t\t<li><i class=\"fa fa-comments-o\" aria-hidden=\"true\"></i>30</li>\n" +
                            "    \t\t\t\t\t\t</ul>\n" +
                            "    \t\t\t\t\t</div>\n" +
                            "    \t\t\t\t\t"+value.content+"\n" +
                            "    \t\t\t\t</div>\n" +
                            "    \t\t\t</div>"

                        )

                    });

					var array = returnData;
					var array = array.slice(2,3)
                    //alert("新闻2"+array.length)
                    $.each(array,function (i, value) {
                        //获取数据库日期
                        var now = new Date(value.time);
                        //获取日期年份
                        var year = now.getFullYear();
                        //获取日期月份
                        var month =(now.getMonth() + 1).toString();
                        //获取日期天数
                        var day = (now.getDate()).toString()
                        $("#newschild").append(
                            "\t\t<div class=\"single-item\">\n" +
                            "\t\t\t\t\t\t\t<div class=\"img-holder\">\n" +
                            "\t\t                        <a href=\"news-detail.html\"><figure><img src=\"static/images/news/"+value.pic+"\" alt=\"\" style='height: 40px;width: 40px'></figure>\n" +
                            "\t\t                        \t<div class=\"overlay\">\n" +
                            "\t\t\t                            <div class=\"box\">\n" +
                            "\t\t\t                                <div class=\"content\">\n" +
                            "\t\t\t                                    <div class=\"date\">"+day+"<span>"+month+"月</span></div>\n" +
                            "\t\t\t                                </div>\n" +
                            "\t\t\t                            </div>\n" +
                            "\t\t\t                        </div>\n" +
                            "\t\t                        </a>\n" +
                            "\t\t                    </div>\n" +
                            "\t\t                    <a href=\"news-detail.html\"><h3>"+value.username+"</h3></a>\n" +
                            "\t\t                    "+value.content+"\n" +
                            "\t\t\t\t\t\t</div>"
                        )
                    });

				},
				//调用出错执行的函数
				error: function(responseText){
					//请求出错处理
					console.error(responseText);
				}
			});
		})
	</script>
	<!--百度地图-->

	<div id="allmap" style="height: 400px;width: auto;"></div>
	<script type="text/javascript">
		// 百度地图API功能
		var map = new BMap.Map("allmap");
		map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);
		// 添加带有定位的导航控件
		var navigationControl = new BMap.NavigationControl({
			// 靠左上角位置
			anchor: BMAP_ANCHOR_TOP_LEFT,
			// LARGE类型
			type: BMAP_NAVIGATION_CONTROL_LARGE,
			// 启用显示定位
			enableGeolocation: true
		});
		map.addControl(navigationControl);
		// 添加定位控件
		var geolocationControl = new BMap.GeolocationControl();
		geolocationControl.addEventListener("locationSuccess", function(e){
			// 定位成功事件
			var address = '';
			address += e.addressComponent.province;
			address += e.addressComponent.city;
			address += e.addressComponent.district;
			address += e.addressComponent.street;
			address += e.addressComponent.streetNumber;
			$("#location1").val(address)
			alert("当前定位地址为：" + address);
			alert($("#location1").val())
		});
		geolocationControl.addEventListener("locationError",function(e){
			// 定位失败事件
			alert(e.message);
		});
		map.addControl(geolocationControl);

		map.enableScrollWheelZoom();   //启用滚轮放大缩小，默认禁用
		map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用
	</script>
    <!-- google map area end -->

<!--	根据IP获取地址-->
	<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
	<script type="text/javascript">
		//alert(returnCitySN['cip'] + returnCitySN['cname']);
		$(function  () {
			var loc = returnCitySN['cname'];
			var ip = returnCitySN['cip'];
			console.log(loc)
			$.ajax({
				//提交数据的类型 POST GET
				type:"POST",
				//提交的网址
				url:"http://api.map.baidu.com/location/ip?ip="+ip+"&ak=zDqmG3CQkiKUB2Bjl6Truw8MhV0klRck&coor=bd09ll",
				dataType:"json",
				async:false,
				//成功返回之后调用的函数
				contentType:"application/json",
				data: JSON.stringify({
					"location": loc
				}),
				success:function(returnData){

				},
				//调用出错执行的函数
				error: function(responseText){
					//请求出错处理
					console.error(responseText);
				}
			});

			$.ajax({
				//提交数据的类型 POST GET
				type:"POST",
				//提交的网址
				url:"showHotel",
				dataType:"json",
				async:true,
				//成功返回之后调用的函数
				contentType:"application/json",
				data: JSON.stringify({
					"location": loc
				}),
				success:function(returnData){
					$.each(returnData,function (i, value) {
						<!--展示酒店-->
						$("#row").append("<div class=\"col-md-4 col-sm-6 col-xs-12\">\n" +
								"    \t\t\t\t<div class=\"single-item\">\n" +
								"    \t\t\t\t\t<div class=\"img-box\">\n" +
								"    \t\t\t\t\t\t<figure><a href=\"/hotelDetail?id="+value.id+"\"><img src=\"static/images/service/"+value.pic+"\" alt=\"\"></a></figure>\n" +
								"    \t\t\t\t\t</div>\n" +
								"    \t\t\t\t\t<div class=\"service-content\">\n" +
								"    \t\t\t\t\t\t<a href=\"/hotelDetail?id="+value.id+"\"><h3>"+value.hotelName+"</h3></a>\n" +
								"    \t\t\t\t\t\t<div class=\"text\"><span>"+value.hotelPrice+"</span> 元/ 晚</div>\n" +
								"    \t\t\t\t\t\t<ul class=\"rating\">\n" +
								"    \t\t\t\t\t\t\t<li><i class=\"fa fa-star\" aria-hidden=\"true\"></i></li>\n" +
								"    \t\t\t\t\t\t\t<li><i class=\"fa fa-star\" aria-hidden=\"true\"></i></li>\n" +
								"    \t\t\t\t\t\t\t<li><i class=\"fa fa-star\" aria-hidden=\"true\"></i></li>\n" +
								"    \t\t\t\t\t\t\t<li><i class=\"fa fa-star\" aria-hidden=\"true\"></i></li>\n" +
								"    \t\t\t\t\t\t\t<li><i class=\"fa fa-star\" aria-hidden=\"true\"></i></li>\n" +
								"    \t\t\t\t\t\t</ul>\n" +
								"                \t<div> "+value.location+"</div>\n" +
								"    \t\t\t\t\t</div>\n" +
								"    \t\t\t\t</div>\n" +
								"    \t\t\t</div>"
						)

					});
				},
				//调用出错执行的函数
				error: function(responseText){
					//请求出错处理
					console.error(responseText);
				}
			});
		})
	</script>


	<!--页眉-->
	<div class="footer" id="footer" ></div>
	<script type="text/javascript">
		/*引入footer部分公共代码*/
		$(function(){
			$.ajax({
				type:"get",
				url:"footer.html",
				async:true,
				success:function(data){
					$("#footer").html(data);
				}
			});
		});
	</script>
</div>
<!--End pagewrapper-->


<!--Scroll to top-->
<div class="scroll-to-top scroll-to-target" data-target=".main-header"><span class="icon fa fa-angle-up"></span></div>

<!-- jQuery js -->


<script src="static/js/map-script.js"></script>
<script type="text/javascript" src="static/js/jquery-2.1.4.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/jquery.themepunch.tools.min.js"></script>
<script src="static/js/jquery.themepunch.revolution.min.js"></script>
<script type="text/javascript" src="static/js/revolution.extension.slideanims.min.js"></script>
<script type="text/javascript" src="static/js/revolution.extension.layeranimation.min.js"></script>
<script type="text/javascript" src="static/js/revolution.extension.navigation.min.js"></script>
<script type="text/javascript" src="static/js/revolution.extension.kenburn.min.js"></script>
<script type="text/javascript" src="static/js/revolution.extension.actions.min.js"></script>
<script type="text/javascript" src="static/js/revolution.extension.parallax.min.js"></script>
<script type="text/javascript" src="static/js/revolution.extension.migration.min.js"></script>
<script type="text/javascript" src="static/js/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="static/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="static/js/owl.carousel.min.js"></script>
<script type="text/javascript" src="static/js/jquery.appear.js"></script>
<script type="text/javascript" src="static/js/jquery.countTo.js"></script>
<script src="static/js/isotope.js"></script>
<script src="static/js/jquery.fancybox.pack.js"></script>
<script src="static/js/jquery.fancybox-media.js"></script>
<script src="static/js/owl.js"></script>
<script src="static/js/masterslider.js"></script>
<script type="text/javascript" src="static/js/jquery.polyglot.language.switcher.js"></script>
<script src="static/js/owl.carousel.min.js"></script>
<script type="text/javascript" src="static/js/jquery.mixitup.min.js"></script>
<script src="static/js/validate.js"></script>
<script src="static/js/wow.js"></script>
<script src="static/js/script.js"></script>
<script type="text/javascript" src="static/js/theme.js"></script>

<script src="static/js/timePicker.js"></script>
<script src="static/js/jquery-ui.js"></script>



<!-- End of .page_wrapper -->

</body>
</html>
